package com.example.managementjava;

import com.example.managementjava.Leave.Leave;

import java.io.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;

@WebServlet(name = "helloServlet", value = "/hello-servlet")
public class HelloServlet extends HttpServlet {
    private String message;

    public void init() {
        message = "Hello World!";
    }

    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        //解决中文乱码
        resp.setContentType("text/html;charset=utf-8");
        //请求解决乱码
        req.setCharacterEncoding("utf-8");
        //响应解决乱码
        resp.setCharacterEncoding("utf-8");
        PrintWriter writer = resp.getWriter();
    }
}